<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>狂神说Java</title>
    <!--v-cloak 解决闪烁问题-->
    <style> [v-cloak] {
        display: none;
    }
    </style>
</head>
<body>
<div id="vue" v-cloak>
    <div>名称：{{ info.name }}</div>
    <div>地址：{{ info.address.country }}-{{ info.address.city }}-
        {{ info.address.street }}
    </div>
    <div>链接：<a v-bind:href="info.url" target="_blank">{{ info.url }}</a>
    </div>
</div>
</body>

<script src="vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script>
    var vm = new Vue({
        el: '#vue',
        data() {
            return {
                info: null

            }
        }, mounted() { //钩子函数
            axios.get('data.json').then(response => (this.info = response.data));
        }
    });
</script>
</html>